#!/bin/bash

if [ ! -f ~/.gtkdocpo ];then
    printf "\033[1;31m==> "说明："\033[1;0m\033[1;1m请在下面输入您的用户名,当前可供选择的用户名如下：\033[1;0m\n" >&2;
    cat AUTHORS|grep -v "^#"|grep -v "unknown"|grep -v "finished"|sort|awk '{print $1}'
    echo -n "请输入:"
    read username
    while [ -z $username ]
    do
	    echo -n "请输入:"
	    read username
    done
    printf "\033[1;0m\033[1;1m您输入的用户名为==>\033[1;31m "$username" \033[1;0m\n" >&2;
    printf "\033[1;0m\033[1;1m以后可以通过修改 ~/.gtkdocpo 文件来改变。\033[1;0m\n" >&2;
    echo "username=$username" > ~/.gtkdocpo
fi

[ -d $HOME/bin ] || mkdir $HOME/bin
cp ../../tools/gadt-po ~/bin/
cp ../../tools/gadt-xmlpo ~/bin/
cp ../../tools/gadt-mkhtml ~/bin
cp ../../tools/gadt-autotrans ~/bin
cp ../../tools/gadt-tx ~/bin
